import request from "@/utils/request";
// 根据学校Id获取组织机构信息
export function getOrganizationInfo(params) {
  return request({
    url: "/school/manager/Organization/school/getOrganizationInfo",
    method: "get",
    params: params,
  });
}

////////// 分院
// 查询分院管理员列表
export function listPost_branchAdmin(query) {
  return request({
    url: "/school/manager/Organization/branchManager/list",
    method: "get",
    params: query,
  });
}
// 新增分院管理员
export function addPost_branchAdmin(data) {
  return request({
    url: "/school/manager/Organization/schoolBranchManager",
    method: "post",
    data: data,
  });
}
// 查询列表
export function listPost_branch(query) {
  return request({
    url: "/school/manager/Organization/branch/list",
    method: "get",
    params: query,
  });
}

// 查询详细
export function getPost_branch(branchId) {
  return request({
    url: "/school/manager/Organization/branch/" + branchId,
    method: "get",
  });
}

// 新增
export function addPost_branch(data) {
  return request({
    url: "/school/manager/Organization/branch",
    method: "post",
    data: data,
  });
}

// 修改
export function updatePost_branch(data) {
  return request({
    url: "/school/manager/Organization/branch",
    method: "put",
    data: data,
  });
}

// 删除
export function delPost_branch(postId) {
  return request({
    url: "/school/manager/Organization/branch/" + postId,
    method: "delete",
  });
}

////////// 专业
// 查询列表
export function listPost_major(query) {
  return request({
    url: "/school/manager/Organization/major/list",
    method: "get",
    params: query,
  });
}

// 查询详细
export function getPost_major(majorId) {
  return request({
    url: "/school/manager/Organization/major/" + majorId,
    method: "get",
  });
}

// 新增
export function addPost_major(data) {
  return request({
    url: "/school/manager/Organization/major",
    method: "post",
    data: data,
  });
}

// 修改
export function updatePost_major(data) {
  return request({
    url: "/school/manager/Organization/major",
    method: "put",
    data: data,
  });
}

// 删除
export function delPost_major(postId) {
  return request({
    url: "/school/manager/Organization/major/" + postId,
    method: "delete",
  });
}

////////// 班级
// 查询列表
export function listPost_class(query) {
  return request({
    url: "/school/manager/Organization/class/list",
    method: "get",
    params: query,
  });
}

// 查询详细
export function getPost_class(postId) {
  return request({
    url: "/school/manager/Organization/class/" + postId,
    method: "get",
  });
}

// 新增
export function addPost_class(data) {
  return request({
    url: "/school/manager/Organization/class",
    method: "post",
    data: data,
  });
}

// 修改
export function updatePost_class(data) {
  return request({
    url: "/school/manager/Organization/class",
    method: "put",
    data: data,
  });
}

// 删除
export function delPost_class(postId) {
  return request({
    url: "/school/manager/Organization/class/" + postId,
    method: "delete",
  });
}
